Programming Android by Zigurd Mednieks & Laird Dornin & G. Blake Meike & Masumi Nakamura

Programming Android by Zigurd Mednieks & Laird Dornin & G. Blake Meike & Masumi Nakamura

Author:Zigurd Mednieks & Laird Dornin & G. Blake Meike & Masumi Nakamura
Language: eng
Format: mobi, epub
Tags: COMPUTERS / Programming Languages / General
Publisher: O'Reilly Media
Published: 2011-07-14T16:00:00+00:00


Cursor

A container for the results of a database query that supports an MVC-style observation system. Cursors are similar to JDBC result sets and are the return value of a database query in Android. A cursor can represent many objects without requiring an instance for each one. With a cursor, you can move to the start of query results and access each row one at a time as needed. To access cursor data, you call methods named as Cursor.getAs*(int columnNumber) (e.g., getAsString). The values the cursor will return depend on the current cursor index, which you can increment by calling Cursor.moveToNext, or decrement by calling Cursor.moveToPrevious, as needed. You can think of the current index of the cursor as a pointer to a result object.

Cursors are at the heart of the basis for Android MVC, which we will cover in detail in Chapter 12.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.